#include "stm32f10x.h"                  // Device header
#include "servo.h"
#include "key.h"
#include "OLED.h"
float Angle=0;
int main()
{
	OLED_Init();
	key_Init();
	Servo_Init();
	OLED_ShowString(1,1,"Angle:");
	while(1)
	{
		if(Get_GPIOB1()==1)
		{
			Angle+=25;
			if(Angle>180)
			{
				Angle=0;
			}
		}
		Servo_setAngle(Angle);
		OLED_ShowNum(1,7,Angle,5);
	}
}
